$(function(){
	//初始化表格
	$('#WaiQindg').datagrid({
	    url:'WaiQin',
	    /* queryParams:{
	    	deptno:10
	    }, */
	    columns:[[
			{field:'FIDID',width:1,checkbox:true,title:'外勤编号',align:'center'},
			{field:'CWASID',width:1,title:'所属考勤卡',align:'center'},
			{field:'EMPNAME',width:1,title:'员工姓名',align:'center'},
			{field:'DEPTNAME',width:1,title:'部门',align:'center'},
			{field:'TEMNAME',width:1,title:'班组',align:'center'},
			{field:'FIDLOC',width:1,title:'外勤地点',align:'center'},
			{field:'FIDTIME',width:1,title:'外勤时间',align:'center'},
			{field:'RSNREASON',width:1,title:'外勤原因',align:'center'},
			{field:'FIDREM',width:1,title:'备注',align:'center'}
	    ]],
	    pagination:true,
	    pageNumber:1,
	    pageSize:5,
	    pageList:[5,10,15]
	});
});

//删除方法
function deleteyy(RSNID){
	$.ajax({
		url:"deleteYY",
		type:"post",
		data:{"RSNID":RSNID},
		success:function(data){
			$('#YuanYindg').datagrid('reload');
		}
	});
}

//post请求
function post(URL, PARAMS) {      
    var temp = document.createElement("form");      
    temp.action = URL;      
    temp.method = "post";      
    temp.style.display = "none";      
    for (var x in PARAMS) {      
        var opt = document.createElement("textarea");      
        opt.name = x;      
        opt.value = PARAMS[x];      
        // alert(opt.name)      
        temp.appendChild(opt);      
    }      
    document.body.appendChild(temp);      
    temp.submit();      
    return temp;      
}